{extend name="admin@index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-tab layui-tab-card">
            <ul class="layui-tab-title">
                {volist name="nameArray" id="vo"}
                <li class="{if $key==$name}layui-this{/if}"><a
                        href="{:url('attachment/third_oss/show',['name'=>$key])}">{$vo}</a>
                </li>
                {/volist}
            </ul>
            <div class="layui-tab-content">
                <form class="layui-form" method="post">
                    {if condition="$name == 'aliyuncs'"}
                    <div class="layui-form-item">
                        <label class="">AccessKey ID和AccessKey Secret你可以通过 <a href="https://oss.console.aliyun.com/overview"
                                                                target="_blank"> 阿里云</a>
                            获取</label>
                    </div>
                    {elseif condition="$name == 'tencent'" /}
                    <div class="layui-form-item">
                        <label class="">AppID、SecretId和SecretKey可以通过<a
                                href="https://console.cloud.tencent.com/cam/capi" target="_blank"> 腾讯云</a>
                            获取</label>
                    </div>
                    <div class="layui-form-item">
                        <label class="">AppID：</label>
                        <div class="layui-form-field-label">
                            <input type="text" name="appid" placeholder="请输入AppID" autocomplete="off"
                            class="layui-input" value="{$info.appid}"/>
                        </div>
                    </div>
                    {elseif condition="$name == 'douyin'" /}
                    <div class="layui-form-item">
                        <label class="">AccessKeyID、SecretAccessKey可以通过<a
                                href="https://cloud.douyin.com/vol_engine?app=tt3692402fa9a46d8801&env=env-axE6XE02qP&osTab=5&source=1&type=1" target="_blank"> 抖音云</a>
                            获取，控制台->对象存储->访问控制->对象存储SDK访问密钥->应用访问秘钥->prod生产环境</label>
                        <br />
                        <label class="">获取地域和访问域名（Endpoint）可以通过<a
                                href="https://www.volcengine.com/docs/6349/107356" target="_blank"> 地域和访问域名</a>
                            获取</label>
                    </div>
                    {/if}
                    <div class="layui-form-item">
                        <label class="">{if condition="$name == 'aliyuncs' || $name== 'douyin'"}AccessKey ID {else /}SecretId{/if}：</label>
                        <div class="layui-form-field-label">
                            <input type="text" name="accessKey" placeholder="请输入{if condition=" $name==
                            'aliyuncs' || $name== 'douyin'"}AccessKey ID {else /}SecretId{/if}" autocomplete="off"
                            class="layui-input" value="{$info.accessKey|default=''}"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="">{if condition="$name == 'aliyuncs' || $name== 'douyin'"}AccessKey Secret {else /}SecretKey{/if}：</label>
                        <div class="layui-form-field-label">
                            <input type="text" name="secretKey" placeholder="请输入{if condition="$name == 'aliyuncs' || $name== 'douyin'"}AccessKey Secret {else /}SecretKey{/if}" autocomplete="off"
                                   class="layui-input" value="{$info.secretKey|default=''}"/>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="">{if condition="$name == 'aliyuncs'"}Bucket名称（空间名） {else /}存储桶名称{/if}：</label>
                        <div class="layui-form-field-label">
                            <input type="text" name="bucket" placeholder="请输入{if condition="$name == 'aliyuncs'"}Bucket名称（空间名） {else /}存储桶名称{/if}" autocomplete="off"
                                   class="layui-input" value="{$info.bucket|default=''}"/>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="">{if condition="$name == 'aliyuncs'"}EndPoint(地域节点) {elseif condition="$name == 'douyin'"}地域（Region） {else /}存储桶地域
                            {/if}</label>
                        <div class="layui-form-field-label">
                            <input type="text" name="endpoint" placeholder="请输入{if condition=" $name== 'aliyuncs'"}EndPoint(地域节点) {elseif condition="$name == 'douyin'"}地域（Region） {else /}存储桶地域
                            {/if}"
                            autocomplete="off"
                            class="layui-input" value="{$info.endpoint|default=''}"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="">{if condition="$name == 'douyin'"} 对象存储域名 {else/} 访问地址{/if}<span style="color: red">（url地址需要以http或https开头，以/结尾）</span></label>
                        <div class="layui-form-field-label">
                            <input type="text" name="url" placeholder="请输入{if condition="$name == 'douyin'"} 对象存储域名 {else/} 访问地址{/if}"
                            autocomplete="off"
                            class="layui-input" value="{$info.url|default=''}"/>
                        </div>
                    </div>
                    {if condition="$name == 'aliyuncs'"}
                    <div class="layui-form-item">
                        <label class="">CDN地址<span style="color: red">（如果配置CND地址将覆盖访问地址）</span></label>
                        <div class="layui-form-field-label">
                            <input type="text" name="cdn" placeholder="请输入CDN地址"
                            autocomplete="off"
                            class="layui-input" value="{$info.cdn|default=''}"/>
                        </div>
                    </div>
                    {/if}

                    <div class="layui-form-item">
                        <div>
                            <button class="layui-btn" lay-submit="" lay-filter="formSubmit">立即提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

{/block}
